<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>女神</title>
</head>
<body>
<h4 style="color:#2ea23c">· 女神 XXXXXXXXXX 12:38:22</h4>
<p id="nvs">我去洗澡了</p>

<div id="tiamdig" style="display:none">
  <h4 style="color:#1d1dba">· 我 XXXXXXXXXX 12:38:23</h4>
  <p id="tiandig"></p>
</div>

<div id="nvs_res" style="display:none">
  <h4 style="color:#2ea23c">· 女神 XXXXXXXXX 12:38:26</h4>
  <p>嗯</p>
</div>
<div style="position:fixed;bottom:20px;">
  <label for="dig-say"></label><input type="text" id="dig-say" onchange="changeSay(this)" placeholder="请输入内容...">
  <input type="button" value="发送" onclick="sent()"/>
</div>


<script>
  var dig = document.getElementById("tiandig");
  var dig_say = '';
  function changeSay(e) {
    dig_say = e.value;

  }

  function nvssay() {
    document.getElementById("nvs_res").style.display = "block"
  }
  function sent() {
    document.getElementById("tiandig").style.display = "block"
    document.getElementById("tiamdig").style.display = "block"
    dig.innerText = dig_say;
    document.getElementById("dig-say").value = "";
    setTimeout("nvssay()", 3000);



  }

</script>
</body>
</html>